package com.example;

public class MyClass {

    private static float ft0 = 0;
    private static float ft1 = 0;
    private static float ft2 = 0;

    private static float fx0 = 0;
    private static float fx1 = 0;
    private static float fx2 = 0;
    private static float fx3 = 0;

    private static float fy0 = 0;
    private static float fy1 = 0;
    private static float fy2 = 0;

    private static float v0 = 0;
    private static float v1 = 0;
    private static float v2 = 0;

    private static int error = 1;

    public static void main(String[] args) {

        int[] ab = {111111};





        // countLocation();
        float pow = (float) (1.8 * Math.pow(10, -12));

        printF(pow);
        // printF(1.8 * 1.8 * 1.8);
    }


    private static void countLocation() {

        if (error == 0) {

            v0 = (float) Math.sqrt(((fx1 - fx0) * (fx1 - fx0) + (fy1 - fy0) * (fy1 - fy0)) / (ft1 - ft0));
            v1 = (float) Math.sqrt((fx2 - fx1) * (fx2 - fx1) + (fy2 - fy1) * (fy2 - fy1) / (ft2 - ft1));

            if ((v0 > 1.8 * Math.pow(10, -12)) && (v0 / v1 > 1.5)) {
                error = 1;
            }
        }

        if (error == 2) {
            v2 = (float) Math.sqrt((fx2 - fx0) * (fx2 - fx0) + (fy2 - fy1) * (fy2 - fy0) / (ft2 - ft0));

            if (v2 > 2.5 * Math.pow(10, -12) && (v2 / v1 > 2.25)) {
                // 读取下一个数 f0 变成 f1 f1变成f2
                fx2 = (fx3 + fx0) / 3;
                fx1 = (fx3 + fx0) * 2 / 3;
            } else {
                fx2 = (fx3 + fx1) / 2;
            }
            error = 0;
        }
    }

    private static void printF(Object o) {
        System.out.println("gzw~: " + o.toString());
    }
}
